package com.tianyadu.user.service.impl;

import com.tianyadu.user.dataobject.UserInfo;
import com.tianyadu.user.repository.UserInfoRepostory;
import com.tianyadu.user.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @FileName: UserServiceImpl
 * @Description:
 * @author: xueyj
 * @create: 2018-11-26 18:53
 */
@Service
@Slf4j
public class UserServiceImpl implements UserService {
    @Autowired
    private UserInfoRepostory repostory;

    /**
     * 通过openid来查询用户信息
     *
     * @param openid
     * @return
     */
    @Override
    public UserInfo findByOpenid(String openid) {
        return repostory.findByOpenid(openid);
    }
}